]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Only recognize common url schemes in notification messages
authorMonica Chelliah <chell22m@mtholyoke.edu>
Sun, 14 Apr 2013 20:15:04 +0000 (16:15 -0400)
committerOwen W. Taylor <otaylor@fishsoup.net>
Mon, 29 Apr 2013 15:22:44 +0000 (11:22 -0400)
Before the fix, the message tray highlighted all urls containing "://", even
invalid ones. This change fixes this by have the message tray highlight only
the urls with http, https, ftp schemes.

Credit goes to: Phuong Vu, Liye Fu, Monica Chelliah, Owen Taylor

https://bugzilla.gnome.org/show_bug.cgi?id=661225

js/misc/util.js

index 15edc37ef0dc80fb378264d30ba29da176f753e9..3864ae59f798e43c3fe977d4b83acd6cd745b9d3 100644 (file)
@@ -18,7 +18,7 @@ const _urlRegexp = new RegExp(
     '(^|' + _leadingJunk + ')' +
     '(' +
         '(?:' +
-            '[a-z][\\w-]+://' +                   // scheme://
+            '(?:http|https|ftp)://' +             // scheme://
             '|' +
             'www\\d{0,3}[.]' +                    // www.
             '|' +